<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="simpletourDevops">
		<meta name="author" content="www.roddypy.com">

		<link rel="shortcut icon" href="/static/assets/images/favicon_1.ico">

		<title>SimpletourDevops</title>

		<link href="/static/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/core.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/components.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/icons.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/pages.css" rel="stylesheet" type="text/css" />
        <link href="/static/assets/css/responsive.css" rel="stylesheet" type="text/css" />
		<link href="/static/assets/plugins/sweetalert/dist/sweetalert.css" rel="stylesheet" type="text/css">

        <!-- HTML5 Shiv and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->

        <script src="/static/assets/js/modernizr.min.js"></script>

	</head>
	<body>
		<div class="account-pages"></div>
		<div class="clearfix"></div>
		<div class="wrapper-page">
			<div class=" card-box">
				<div class="panel-heading">
					<h3 class="text-center"> Simpletour <strong class="text-custom">Devops</strong> </h3>
				</div>

				<div class="panel-body">
					<form class="form-horizontal m-t-20" method="post" action="{% url 'Register' %}">

						{% csrf_token  %}

						<div class="form-group ">
							<div class="col-xs-12">
								{{ data.email}}
								{{ data.email.errors}}
							</div>
						</div>


						<div class="form-group ">
							<div class="col-xs-12">
								{{ data.username}}
								{{ data.username.errors}}
							</div>
						</div>

						<div class="form-group ">
							<div class="col-xs-12">
								{{ data.password1}}
								{{ data.password1.errors}}
							</div>
						</div>

						<div class="form-group">
							<div class="col-xs-12">
								{{ data.password2}}
								{{ data.password2.errors}}
							</div>
						</div>

						{% for e in regerror %}
							{{e}}

						{% endfor%}

						<div class="form-group">
							<div class="col-xs-12">
								<div class="checkbox checkbox-primary">
									<input id="checkbox-signup" type="checkbox" checked="checked">
									<label for="checkbox-signup">我同意 <a  href="#" data-toggle="modal" data-target="#myModal">请阅读相关说明</a></label>

								</div>
							</div>
						</div>

						<div class="form-group text-center m-t-40">
							<div class="col-xs-12">
								<button class="btn btn-pink btn-block text-uppercase waves-effect waves-light"  type="submit">
									注册
								</button>
							</div>
						</div>
					</form>

				</div>
			</div>

			<div class="row">
				<div class="col-sm-12 text-center">
					<p>
						是否已经注册?<a href="{%  url 'Login' %}" class="text-primary m-l-5"><b>登录</b></a>
					</p>
				</div>
			</div>
		</div>

		<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
                                        <div class="modal-dialog">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                    <h4 class="modal-title" id="myModalLabel">用户注册说明</h4>
                                                </div>
                                                <div class="modal-body">

                                                    <h4>用户注册需知</h4>
													<p>1.您确认，在您成为我们的用户之前已充分阅读、理解并接受本协议的全部内容，一旦您使用本服务，即表示您同意遵循本协议之所有约定。</p>
                                                    <p>2.本系统为SimpleTour自动化运维系统，注册人不能对本系统相关资源信息进行泄漏</p>
                                                    <p>3.系统注册用户名为注册人邮箱地址，请牢记使用</p>
                                                    <p>4.注册人权限需要运维人员进行权限开通方可使用.</p>

                                                </div>
                                                <div class="modal-footer">
                                                    <button type="button" class="btn btn-default waves-effect" data-dismiss="modal">关闭</button>

                                                </div>
                                            </div><!-- /.modal-content -->
                                        </div><!-- /.modal-dialog -->
                                    </div>

		<script>
			var resizefunc = [];
		</script>

		<script type="text/javascript">

			function register(){

				var username = $("#id_username").val();
				var email = $("#id_email").val();
				var password1 = $("#id_password1");
				var password2 = $("#id_password2");

				alert(username);

				$.ajax({
					type: 'post',
					dataType:'json',
					data:{
                        username: username,
                        email: email,
                        password1: password1,
                        password2: password2,
                        csrfmiddlewaretoken:'{{ csrf_token  }}',
                       },
					url: "{% url 'Register' %}",
					success: function(result){
						alert(OK);
					}
				});
			}
		</script>

		<!-- jQuery  -->
        <script src="/static/assets/js/jquery.min.js"></script>
        <script src="/static/assets/js/bootstrap.min.js"></script>
        <script src="/static/assets/js/detect.js"></script>
        <script src="/static/assets/js/fastclick.js"></script>
        <script src="/static/assets/js/jquery.slimscroll.js"></script>
        <script src="/static/assets/js/jquery.blockUI.js"></script>
        <script src="/static/assets/js/waves.js"></script>
        <script src="/static/assets/js/wow.min.js"></script>
        <script src="/static/assets/js/jquery.nicescroll.js"></script>
        <script src="/static/assets/js/jquery.scrollTo.min.js"></script>
        <script src="/static/assets/js/jquery.core.js"></script>
        <script src="/static/assets/js/jquery.app.js"></script>
	    <script src="/static/assets/plugins/sweetalert/dist/sweetalert.min.js"></script>
	    <script src="/static/assets/pages/jquery.sweet-alert.init.js"></script>

	</body>
</html>